package com.ruoyi.huanghefd.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 高空作业审批明细
 * @TableName work_approve_height_detail
 */
@TableName(value ="work_approve_height_detail")
@Data
public class WorkApproveHeightDetail implements Serializable {
    /**
     * id
     */
    @TableField(value = "as_id")
    private String asId;

    /**
     * 高空作业审批单编号
     */
    @TableField(value = "as_code")
    private String asCode;

    /**
     * 审批人:审批人类型：1-班组长，2-部门安全专工，3-生技部专工，4-安质部专工，5-安全总监，6-部门主任，7-生技部主任，8-安质部主任，9-副总经理（生产）10-其他
     */
    @TableField(value = "approver")
    private String approver;

    /**
     * 意见
     */
    @TableField(value = "suggest")
    private String suggest;

    /**
     * 签名id
     */
    @TableField(value = "approver_sign_id")
    private String approverSignId;

    /**
     * 签名
     */
    @TableField(value = "approver_sign")
    private String approverSign;

    /**
     * 时间
     */
    @TableField(value = "approver_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approverTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WorkApproveHeightDetail other = (WorkApproveHeightDetail) that;
        return (this.getAsId() == null ? other.getAsId() == null : this.getAsId().equals(other.getAsId()))
            && (this.getAsCode() == null ? other.getAsCode() == null : this.getAsCode().equals(other.getAsCode()))
            && (this.getApprover() == null ? other.getApprover() == null : this.getApprover().equals(other.getApprover()))
            && (this.getSuggest() == null ? other.getSuggest() == null : this.getSuggest().equals(other.getSuggest()))
            && (this.getApproverSignId() == null ? other.getApproverSignId() == null : this.getApproverSignId().equals(other.getApproverSignId()))
            && (this.getApproverSign() == null ? other.getApproverSign() == null : this.getApproverSign().equals(other.getApproverSign()))
            && (this.getApproverTime() == null ? other.getApproverTime() == null : this.getApproverTime().equals(other.getApproverTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAsId() == null) ? 0 : getAsId().hashCode());
        result = prime * result + ((getAsCode() == null) ? 0 : getAsCode().hashCode());
        result = prime * result + ((getApprover() == null) ? 0 : getApprover().hashCode());
        result = prime * result + ((getSuggest() == null) ? 0 : getSuggest().hashCode());
        result = prime * result + ((getApproverSignId() == null) ? 0 : getApproverSignId().hashCode());
        result = prime * result + ((getApproverSign() == null) ? 0 : getApproverSign().hashCode());
        result = prime * result + ((getApproverTime() == null) ? 0 : getApproverTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", asId=").append(asId);
        sb.append(", asCode=").append(asCode);
        sb.append(", approver=").append(approver);
        sb.append(", suggest=").append(suggest);
        sb.append(", approverSignId=").append(approverSignId);
        sb.append(", approverSign=").append(approverSign);
        sb.append(", approverTime=").append(approverTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}